<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Welcome to Koza</title>
    <script type="text/javascript" src="<?= $this->config->site_url(); ?>media/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="<?= $this->config->site_url(); ?>media/js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script type="text/javascript" src="<?= $this->config->site_url(); ?>media/js/jquery.leanModal.min.js"></script>
    <script type="text/javascript" src="<?= $this->config->site_url(); ?>media/js/jquery.json-2.4.min.js"></script>
    <link rel="stylesheet" type="text/css" href="<?= $this->config->site_url(); ?>media/css/style.css">
</head>
<body>

<div id="container">
    <h1>Добро пожаловать в Koza Project!</h1>

    <div id="body">
        <p>Здравствуйте, <?= $user->email ?>!</p>
        <p><a href="#logout" id="logoutBtn">Выход</a></p>
    </div>

    <p class="footer">Страница сгенерирована за <strong>{elapsed_time}</strong> секунд</p>
</div>

<script type="text/javascript">
    $(function() {
        $('#logoutBtn').click(function(){
            $.post('<?= $this->config->site_url("ajax/logoutUser"); ?>', {}, function(){
                self.location = '<?= $this->config->site_url(); ?>';
            });

            return false;
        });
    });
</script>

</body>
</html>